﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.MYD
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.MYD;

    public class XMMYD_Table_Map : EntityMapping<XMMYD_Table>
    {
        public XMMYD_Table_Map()
        {
            Property(x => x.ItemA);
            Property(x => x.ItemB);
            Property(x => x.ItemC);
            Property(x => x.ItemD);
            Property(x => x.ItemE);
            Property(x => x.ItemF);

            Property(x => x.ItemA, map => map.Length(10000));
            Property(x => x.ItemB, map => map.Length(10000));
            Property(x => x.ItemC, map => map.Length(10000));
            Property(x => x.ItemD, map => map.Length(10000));
            Property(x => x.ItemE, map => map.Length(10000));
            Property(x => x.ItemF, map => map.Length(10000));

            Property(x => x.TBRLXDH);
            Property(x => x.TBRXM);
            Property(x => x.TBSJ);

            Property(x => x.YJ1, map => map.Length(10000));
            Property(x => x.YJ2, map => map.Length(10000));
            Property(x => x.YJ3, map => map.Length(10000));
            Property(x => x.YJ4, map => map.Length(10000));

            ManyToOne(x => x.Project, map => map.Column(XMMYD_Table.Columns.proj_id));
            Table(XMMYD_Table.TableName);
        }
    }
}
